#ifndef __PLAYER_DATA_MACHINE_H__
#define __PLAYER_DATA_MACHINE_H__

#include <memory>
#include "EasyMachine.hpp"

namespace PocketSurvival
{
    class PlayerData;

    enum class PlayerMachineState
    {
        Enter,          // 玩家进入
        Playing,        // 正常游戏中
        Dead,           // 死亡
        Restart         // 重生
    };

    class PlayerMachine : public EasyMachine<PlayerMachineState>
    {
    private:
        PlayerData * m_playerData;
    public:
        PlayerMachine(PlayerData *playerData);

        virtual void enter() override;
        virtual void update(float dt) override;
        virtual void leave() override;
    };

}


#undef CREATE_MACHINE_STRUCT
#undef STRUCT_S

#endif
